package com.zbkj.crmeb.chant.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zbkj.crmeb.chant.model.ReserveMoneyDetail;
import com.zbkj.crmeb.enums.CurrencyEnum;
import com.zbkj.crmeb.store.model.PurchaseGoods;
import com.zbkj.crmeb.store.response.SupplierInfo;

import java.math.BigDecimal;

public interface ReserveMoneyDetailService extends IService<ReserveMoneyDetail> {

    /**
     * 功能描述: 生成备用金明细
     * @Param: [merId, purchaseId, purchasePrice, reserveMoney]
     * @Return: java.lang.Boolean
     * @Author: wangzh
     * @Date: 2023/5/9 11:14
     */
    Boolean saveReserveMoneyDetail(Integer merId, Integer purchaseId, String purchaseOrderId, BigDecimal purchasePrice, BigDecimal reserveMoney, String message);

    /**
     * 功能描述: 备用金
     * @Param: [purchaseGoods, currency, merId, id, ip]
     * @Return: void
     * @Author: wangzh
     * @Date: 2023/5/9 14:15
     */
    void calcReserveMoney(PurchaseGoods purchaseGoods, CurrencyEnum currency, Integer merId, Integer id, String ip);

    /**
     * 功能描述: 检验供应商是否自动结算采购单
     * @Param: [purchaseId, merId]
     * @Return: java.lang.Boolean
     * @Author: wangzh
     * @Date: 2023/5/9 18:08
     */
    Boolean checkSupplierAutoSettlement(Integer purchaseId, Integer merId);
}
